switch (state) {
  case 0:
    LOAD(linkUrl);
  case 1:
    // if the frame has 'id' attributes
    var frameId = "XXX";
    var frame = document.getElementById(frameId);
    // or if not, select it by index
    //var frames = document.getElementsByTagName("frame");
    //var frame = frames[1];
    // redirect to another script (if it's "RegExp" script, source must be "Link")
    REDIRECT(frame.src);
}